import request from '@/utils/request'
export default () => {
	const storeRepair=async(data)=>{
		await request.post("mini/repair",data)
	}
	const getRepair=async(way)=>{
		const {data} =  await request.get(`mini/repair?way=${way}`)
		return data
	}
	const showRepair = async(id)=>{
		return await request.get(`mini/repair/${id}`)
	}
	
	const getRepairHistory=async(way)=>{
		const {data} =  await request.get(`mini/repair/history?way=${way}`)
		return data
	}
	const getRepairInfo = async()=>{
		return   await request.get(`mini/repair/info`)
	}
	return {
		storeRepair,
		getRepair,
		showRepair,
		getRepairHistory,
		getRepairInfo
	}
}